package com.dubious.salesforce;

import java.util.ArrayList;
import java.util.List;

public class Node {

    public enum InstallState {
        NOT_INSTALLED, IMPLICIT, EXPLICIT;
    }

    private String name;
    private List<String> children;
    private List<String> parents;
    private InstallState installState;

    public Node() {
        children = new ArrayList<String>();
        parents = new ArrayList<String>();
    }

    public Node withName(String name) {
        this.name = name;
        return this;
    }

    public Node withInstallState(InstallState installState) {
        this.installState = installState;
        return this;
    }

    public Node addChild(String childName) {
        this.children.add(childName);
        return this;
    }

    public Node addParent(String parentName) {
        this.parents.add(parentName);
        return this;
    }

    public String getName() {
        return name;
    }

    public InstallState getInstallState() {
        return installState;
    }

    public List<String> getChildren() {
        return children;
    }

    public List<String> getParents() {
        return parents;
    }
}
